//
//  ThemeConfigModel.h
//  MZBasic
//
//  Created by Better on 2022/9/16.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ThemeModel : NSObject<NSMutableCopying,NSCoding>
//版本号
@property (copy,nonatomic) NSString *version;
//key name
@property (copy,nonatomic) NSString *name;
//中文名--显示
@property (copy,nonatomic) NSString *nameCn;
//英文名--显示
@property (copy,nonatomic) NSString *nameEn;
//
@property (copy,nonatomic) NSString *startDate;
//
@property (copy,nonatomic) NSString *endDate;
//压缩包下载地址
@property (copy,nonatomic) NSString *url;
//本地存储地址
@property (copy,nonatomic) NSString *path;
//图片地址
@property (copy,nonatomic) NSString *imageUrl;
//pad图片地址
@property (copy,nonatomic) NSString *HDImageUrl;
//是否是默认皮肤
@property (assign,nonatomic) BOOL *isDefaultSkin;
//是否选中
@property (assign,nonatomic) BOOL isSelect;
//更换主题页面中--是否展示
@property (assign,nonatomic) BOOL isHide;
//是否应用到主题--显示节日主题
@property (assign,nonatomic) BOOL apply;
- (instancetype) initWithDic:(NSDictionary *)dic;
@end

@interface ThemeDownConfigModel : NSObject
/**
   download theme plist
 
 */
+ (void) downLoadThemeConfigModelSuccess:(void(^)(BOOL isSuccess))success
                                 Failure:(void(^)(BOOL isFailure))failure;

+ (BOOL) themeExistWithPath:(NSString *)path;
/**
   read theme plist

  @return ThemePlist
 */
+ (NSDictionary *) readThemePlist;
/**
   get theme Version

  @return Array all theme
 */
+ (NSArray <ThemeModel *>*) themeArray;
/**
   get theme Version

 */
+ (void) cacheUsingTheme:(NSString *)usingTheme;

+ (BOOL) cacheCurrentTheme:(ThemeModel *)themeModel;

+ (ThemeModel *) readCurrentTheme;
/**
 compare Theme Version
手动切换时比较是否需要更新
 */
+ (BOOL *) manuallyNeedUpdateCompareWithLocalVersion:(ThemeModel *)themeModel;
/**
 compare Theme Version
自动切换时比较是否需要更新
 */
+ (void) autoNeedUpdateCompareWithLocalVersion;

+ (void) themeSwitch:(ThemeModel *)themeModel;

+ (void) deleteCurrentTheme;

+ (BOOL) isShowFestivalTheme;
//节日手动设置
+ (void) festivalThemeAndOpration;
//节日手动读取
+ (BOOL) festivalThemeAndOprationTheme;
//节日手动删除
+ (void) festivalThemeAndOprationThemeDelete;

+ (ThemeModel *) festivalTheme;

+ (ThemeModel *) readCurrentNormalTheme;

+ (void) deleteFesticalTheme;


@end
NS_ASSUME_NONNULL_END
